arithmetic types (1) | istream& operator>> (bool& val); istream& operator>> (short& val); istream& operator>> (unsigned short& val); istream& operator>> (int& val); istream& operator>> (unsigned int& val); istream& operator>> (long& val); istream& operator>> (unsigned long& val); istream& operator>> (float& val); istream& operator>> (double& val); istream& operator>> (long double& val); istream& operator>> (void*& val); |
---|---|
stream buffers (2) | istream& operator>> (streambuf* sb ); |
manipulators (3) | istream& operator>> (istream& (*pf)(istream&)); istream& operator>> (ios& (*pf)(ios&)); istream& operator>> (ios_base& (*pf)(ios_base&)); |
arithmetic types (1) | istream& operator>> (bool& val); istream& operator>> (short& val); istream& operator>> (unsigned short& val); istream& operator>> (int& val); istream& operator>> (unsigned int& val); istream& operator>> (long& val); istream& operator>> (unsigned long& val); istream& operator>> (long long& val); istream& operator>> (unsigned long long& val); istream& operator>> (float& val); istream& operator>> (double& val); istream& operator>> (long double& val); istream& operator>> (void*& val); |
---|---|
stream buffers (2) | istream& operator>> (streambuf* sb ); |
manipulators (3) | istream& operator>> (istream& (*pf)(istream&)); istream& operator>> (ios& (*pf)(ios&)); istream& operator>> (ios_base& (*pf)(ios_base&)); |
>>
) applied to an input stream is known as extraction operator. It is overloaded as a member function for:false
). Then (if good), it calls num_get::get (using the stream's selected locale) to perform both the extraction and the parsing operations, adjusting the stream's internal state flags accordingly. Finally, it destroys the sentry object before returning.false
). Then (if good), it extracts characters from its associated stream buffer object as if calling its member functions sbumpc or sgetc, and finally destroys the sentry object before returning.true
). Then (if good), it extracts characters from its associated stream buffer object as if calling its member functions sbumpc or sgetc, and finally destroys the sentry object before returning.pf(*this)
, where pf may be a manipulator.manipulator | Effect |
---|---|
ws | Extracts whitespaces. |
boolalpha/noboolalpha | Activates/deactivates the extraction of alphanumerical representations of values of type bool . |
skipws/noskipws | Activates/deactivates whether leading whitespaces are discarded before formatted input operations. |
dec/hex/oct | Sets that base used to interpret integral numerical values. |
manipulator | Effect |
---|---|
setbase | Sets the numerical base used to interpret integral numerical values. |
setiosflags/resetiosflags | Set/reset format flags. |
*this
).flag | error |
---|---|
eofbit | The input sequence has no more characters available (end-of-file reached). |
failbit | Either no characters were extracted, or the characters extracted could not be interpreted as a valid value of the appropriate type. For (2), it is set when no characters are inserted in the object pointed by sb, or when sb is a null pointer. |
badbit | Error on stream (such as when this function catches an exception thrown by an internal operation). When set, the integrity of the stream may have been affected. |
|
|